<?php #//AJAX PHP PENNY AUCTION v.1.1

#///////////////////////////////////////////////////////////
#//  COPYRIGHT 2009 Aaron Helmlinger ALL RIGHTS RESERVED  //
#///////////////////////////////////////////////////////////

      include "../../includes/config.inc.php";


              include "../loggedin.inc.php";
              
             
                               
          if($_POST[update])  {
       
       
       
       
      $title = $_POST[title];
      $bids = $_POST[bids]; 
      $price = $_POST[price];
      $note1 = $_POST[note1];
          $note2 = $_POST[note2];
       $bidpackid = $_POST[bidpackid];  
    
         
$update = "UPDATE PHPAUCTIONXL_bid_packs SET title='$title', bids='$bids', price='$price', note1='$note1', note2='$note2' WHERE id=$bidpackid ";
$rsUpdate = mysql_query($update);

   
       $URL = "index.php";
	header("Location: $URL");
	exit;
     
}





















  ?>





    


<HTML>
<HEAD>
<link rel='stylesheet' type='text/css' href='../style.css' />
<link href="../css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">





<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td>
    
       <? // -------------------------- Admin Tool Heading --------------------------------------?>
       
       
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr> 
  
<td class="icono"><img src="../images/settings_icon2.gif" width="30" height="29"></td>
          <td class="breadcrumbs"><p><span><?=$MSG_25_0007?></span>&nbsp;&gt;&gt;&nbsp;<?=$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_TITLE_UPDATE; ?></p></td>
          
          
        </tr>
      </table>
      
      
      
      </td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
    <tr> 
    <td align="center" valign="middle">
    
    
    
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD align="center">
<BR>
<FORM NAME=conf ACTION=<?=basename($_SERVER['PHP_SELF'])?> METHOD=POST>


  <? // -------------------------- LIGHT BLUE TITLE BAR --------------------------------------?>

	<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0"  class="base" ALIGN="CENTER" style="border:1px solid #ccc;">
		<TR>
			<TD ALIGN=CENTER class=title>
				<p><? print $MSG_AJAX_ADMIN_MANAGE_BID_PACKS_TITLE_UPDATE; ?></p>
			</TD>
		</TR>
		
		
		
		<TR>
		<TD>
		
    
    
    <TABLE WIDTH=100% ALIGN="CENTER" CELLPADDING=0 cellspacing="0" BGCOLOR="#FFFFFF">
		
 <? // -------------------------- ERROR BAR --------------------------------------?>    
 
 <? if ($ERR) { ?>   
    	<TR>
				<TD COLSPAN="2"  class="error"><B>
					<p><? print $ERR; ?></p>
					</B></TD>
			</TR>
	<? } ?>	
    
    
			
			
 <? // -------------------------- WHITE BAR --------------------------------------?> 			
				
        
<? 

      /*
include "../../includes/passwd.inc.php";
  
  
    $hostname = $DbHost; //// specify host, i.e. 'localhost'
$user = $DbUser; //// specify username
$pass = $DbPassword; //// specify password
$dbase = $DbDatabase; //// specify database name
$connection = mysql_connect("$hostname" , "$user" , "$pass") 
or die ("Can't connect to MySQL");
$db = mysql_select_db($dbase , $connection) or die ("Can't select database.");
          */
                                                      $bidpackid = $_GET['id'];
$query="SELECT * FROM PHPAUCTIONXL_bid_packs where id=$bidpackid ";
$result=mysql_query($query);
$num = mysql_num_rows ($result);

    
if ($num > 0 ) {
$class = " ";
$i=0;
while ($i < $num) {
	if($class == " "){
                		$class = " class=gris ";
                	}else{
                		$class = " ";
                	}
                	
$title = mysql_result($result,$i,"title");
$bids = mysql_result($result,$i,"bids");
$price = mysql_result($result,$i,"price");
$note1 = mysql_result($result,$i,"note1");
$note2 = mysql_result($result,$i,"note2");
$id = mysql_result($result,$i,"id");


echo "<TR><TD WIDTH=125".$class." ><p class=blue >";
echo "<b>".$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_TITLE2."</b><input type=text name=title value='".$title."' ><br>";
echo "<b>".$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_BIDS."</b> <input type=text name=bids value='".$bids."' ><br>";
echo "<b>".$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_PRICE."</b> <input type=text name=price value='".$price."' ><br>";
    $img = substr($note1, 0, 4);
if ( $img == "<IMG" || $img == "<img") {

echo "<br>".$note1."<br>";

}

echo "<b>".$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_TOP_NOTE."</b> <input type=text name=note1 value='".$note1."' ><br>";
echo "<font color=red >".$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_IMAGE_HOW_TO."</font><BR>";
echo "<BR><b>".$MSG_AJAX_ADMIN_MANAGE_BID_PACKS_BOTTOM_NOTE."</b> <input type=text name=note2 value='".$note2."' ><br>";
echo "<br><br>";
echo "</p></TD></TR>";
					
++$i; }

}
      ?>
		 </TD>
			</TR>
		</TABLE>
		
		
		     <INPUT TYPE=hidden NAME=bidpackid VALUE=<? print $_GET['id']; ?> >
		  <INPUT TYPE=hidden NAME=update VALUE=1 >
		        <INPUT TYPE="submit" NAME="act" VALUE="<? print $MSG_AJAX_ADMIN_MANAGE_BID_PACKS_BUTTON_UPDATE; ?>" class="action">
		
		</TD>
		</TR>
	</TABLE>
	</FORM>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
